package com.neulogistics.contrib.procuredcenter.api.application.query;

import com.neulogistics.contrib.procuredcenter.domain.model.enumeration.PurchaseType;
import com.neulogistics.contrib.procuredcenter.domain.model.valueobject.PurchaseItem;
import lombok.Data;

import javax.validation.constraints.*;
import java.io.Serializable;
import java.util.Date;

@Data
public class PurchaseOrderQuery implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 当前页号
     */
    @Positive(message = "当前页数非法！")
    private long pageNum = 1;

    /**
     * 页面大小
     */
    @Positive
    @Max(value = 20, message = "请求数据过多！")
    private long pageSize = 10;


    /**
     * 采购单id
     */
    private Long purchaseOrderId;

    /**
     * 采购单类型：0:进货；1:退货
     */
    private PurchaseType purchaseType;

    /**
     * 关联中心库房id
     */
    private Integer warehouseId;

    /**
     * 采购项，{商品id、数量、单价、计量单位、供应商}
     */
    private PurchaseItem purchaseItem;

    /**
     * 采购单总计
     */
    private Double purchaseTotal;

    /**
     * 生成时间
     */
    private Date createTime;
}
